package com.toocms.jinjuhang.data.order_info

import android.os.Parcel
import android.os.Parcelable

data class OrderCommodityItemData(
    var order_id: String? = "",
    val order_goods_id: String? = "",
    val goods_id: String? = "",
    val goods_sn: String? = "",
    val is_comm: String? = "",
    val goods_name: String? = "",
    val goods_type: String? = "",
    val price: String? = "",
    val points: String? = "",
    val quantity: String? = "",
    val goods_attr_desc: String? = "",
    val cover_path: String? = ""
) : Parcelable {
    constructor(parcel: Parcel) : this(
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readString()
    ) {
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(order_id)
        parcel.writeString(order_goods_id)
        parcel.writeString(goods_id)
        parcel.writeString(goods_sn)
        parcel.writeString(is_comm)
        parcel.writeString(goods_name)
        parcel.writeString(goods_type)
        parcel.writeString(price)
        parcel.writeString(quantity)
        parcel.writeString(goods_attr_desc)
        parcel.writeString(cover_path)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<OrderCommodityItemData> {
        override fun createFromParcel(parcel: Parcel): OrderCommodityItemData {
            return OrderCommodityItemData(parcel)
        }

        override fun newArray(size: Int): Array<OrderCommodityItemData?> {
            return arrayOfNulls(size)
        }
    }
}